package vip.ola.core.service.code;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import vip.ola.core.entity.code.CodeAccountHistory;
import vip.ola.core.entity.code.CodeUser;

import java.math.BigDecimal;
import java.util.Map;


/**
 * <p>
 * 资金账户流水表 服务类
 * </p>
 *
 * @author faker
 * @since 2020-03-25
 */
public interface CodeAccountHistoryService extends IService<CodeAccountHistory> {

    IPage<CodeAccountHistory> list(int currentPage, int pageSize, CodeAccountHistory history);

    Map countAll(CodeAccountHistory history);

    Map countAdd(CodeAccountHistory history);

    Map countSubtract(CodeAccountHistory history);

    Long saveCollHistory(Long userId, String orderNo, BigDecimal orderAmount,
                         BigDecimal userRate, BigDecimal userProfit, BigDecimal agentRate, BigDecimal agentProfit,
                         BigDecimal codeBusRate, BigDecimal codeBusProfit);

}
